# -*- coding: utf-8 -*-
"""
-------------------------------------------------
   File Name：     day103_pyqt5_pushbtn
   Description :
   Author :       fuml
   date：          2019/9/20
-------------------------------------------------
   Change Activity:
                   2019/9/20: add a pushbutton and trigger its event
-------------------------------------------------
"""

import sys
from  PyQt5.QtWidgets import (QApplication,QPushButton,QWidget,QToolTip)
from PyQt5.QtGui import QFont

class Example(QWidget):
    def __init__(self):
        super().__init__()
        self.initUI()

    def initUI(self):
        QToolTip.setFont(QFont('SansSerif',10))
        self.setToolTip('this is a <b>QWidget</b> wiget')

        btn = QPushButton('Button',self)
        btn.setToolTip('this is a <b>QPushbutton</b> wiget')

        btn.resize(btn.sizeHint())
        btn.move(50,50)

        self.setGeometry(300,300,300,300)
        self.setWindowTitle('this is tooltips')
        self.show()

if __name__ == '__main__':
    app = QApplication(sys.argv)
    ex=Example()
    sys.exit(app.exec_())






